package cate.game.role.res.guild;

import cate.game.GameBody;
import cate.game.event.EventPublisher;
import cate.game.role.res.guild.boss.GuildFuncImpl;
import cate.game.role.res.guild.po.GuildPO;
import cate.game.role.res.guild.po.GuildFuncDependent;
import com.fasterxml.jackson.annotation.JsonIgnore;
import easy.java.dev.note.NoteField;


public abstract class GuildFuncBase implements GuildFuncImpl, EventPublisher {

    @JsonIgnore
    @NoteField(value = "公会子功能依赖")
    public GuildFuncDependent funcDependent;

    public void initialize(GuildPO parent) {
        funcDependent = createFuncDependent(parent, null);
    }


    @Override
    public GuildFuncDependent getFuncDependent() {
        return funcDependent;
    }

    @JsonIgnore
    public GameBody getGame(){return funcDependent.guild.game;}
}
